package com.open.order.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.open.common.resp.ResultInfo;
import com.open.order.resp.OrderDTO;
import com.open.order.service.OrderService;

@RestController
public class OrderController {

	@Autowired
	private OrderService orderService;

	@GetMapping("/order/getOrderById/{id}")
	public ResultInfo<OrderDTO> getOrderById(@PathVariable("id") Integer id) {
		return new ResultInfo<OrderDTO>("200", "success", orderService.getOrderById(id));
	}
	
}
